package com.xx.mapper;

import com.xx.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Mapper
public interface BookMapper {
    //获取全部书籍  作者 / 书籍名称
    public List<Book> getList(@Param("bookName") String bookName,
                              @Param("author") String author);

    //获取书籍的详情
    public Book getBookInfo(@Param("bookId") Integer bookId);

    //新增书籍
    public int saveBook(Book book);

    //修改书籍
    public int updateBook(Book book);

    //删除书籍
    public int  delBook(@Param("bookID") Integer bookId);
}
